package com.sky.mapper;

import com.github.pagehelper.Page;
import com.sky.dto.DishDTO;
import com.sky.dto.DishPageQueryDTO;
import com.sky.entity.Dish;
import com.sky.entity.DishFlavor;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface FoodMapper {
    //给dish插入一条数据
    void addFood(Dish dish);

    //菜品分页查询
    Page<Dish> selectFood(DishPageQueryDTO dishPageQueryDTO);

    //根据id删除dish里面的数据
    void deleteById(Long aLong);
    //根据id查询表dish里的数据返回一个dish对象
    Dish dishGetById(Long id);
    //根据Id查询dish表获得对象
    DishDTO selectById(Long id);/*
    //修改dish里的菜品
    void putDosh(Dish dish);*/

    void update(Dish dish);

    List<Dish> selectCategory(Long categoryId);
}
